package org.csu.code.api.service;


import org.csu.code.api.common.CommonResponse;
import org.csu.code.api.entity.Cart;
import org.csu.code.api.vo.CartItemVO;
import org.csu.code.api.vo.CartVO;
import org.springframework.web.bind.annotation.PathVariable;

import java.math.BigDecimal;
import java.util.List;

public interface CartService {
    CommonResponse<List<CartItemVO>> getCartItemByUserid(int userid);

//    CommonResponse<CartVO> insertCartItem(Cart cart);

    CommonResponse<CartVO> addItem(int userid, int itemid, int quantity);

    CommonResponse<BigDecimal> updateQuantity(int userid, int quantity, int itemId);

    CommonResponse<Cart> deleteByUserid(int userid);

    CommonResponse<CartVO> deleteCartitemByUserid(int userid,int itemid);

    double totalItemPrice(int userid);

}
